/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.chl.cid.sasanshop;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author hansena
 */
public class ShoppingCart {

    private final List<String> items = new ArrayList<String>();

    public void addItem(String item) {
        items.add(item);
    }

    public List getItems() {
        //StringBuilder b = new StringBuilder();
        //for(String s : items){
        //  b.append(s);

        //}
        //return b.toString()
        return items;
    }

    public String itemsToString() {
        StringBuilder b = new StringBuilder();

            for (String s : items) {
                b.append(s);
                b.append("\n");
            }

        return b.toString();
    }

    public String getSize() {
        return new Integer(items.size()).toString();
    }
}



